<template>
	<view id='order-detail'>
		<u-form style="background-color: #FFFFFF;" label-position="left" class="demo-table-expand" label-width="150px">
			<u-form-item label="单号">{{obj.number}}</u-form-item>
			<u-form-item label="重量">{{obj.weight}}</u-form-item>
			<u-form-item label="运费">{{obj.freight}}</u-form-item>
			<u-form-item label="品名(中文)">{{obj.articleName}}</u-form-item>
			<u-form-item label="品名(老挝)">{{obj.laosArticleName}}</u-form-item>
			<u-form-item label="收件人姓名(中文)">{{obj.receiverName}}</u-form-item>
			<u-form-item label="收件人姓名(老挝)">{{obj.receiverName}}</u-form-item>
			<u-form-item label="收件人地址(中文)">{{obj.laosReceiverName}}</u-form-item>
			<u-form-item label="收件人地址(老挝)">{{obj.receiverAddress}}</u-form-item>
			<u-form-item label="收件人联系电话">{{obj.laosReceiverAddress}}</u-form-item>
			<u-form-item label="发往网点">{{obj.sendToName}}</u-form-item>
			<u-form-item label="修改原因">{{obj.reason}}</u-form-item>
			<u-form-item v-if="obj.remark" style="color: red;" label="拒绝原因">{{obj.remark}}</u-form-item>
		</u-form>
	</view>
</template>

<script>
	export default {
		name: 'DetailEdit',
		data() {
			return {
				obj: {}
			}
		},
		onLoad(e) {
			this.getData(e.number, e.state)
		},
		methods: {
			getData(number, state) {
				if (!number) return
				let param = {
					number: number,
					size: 1,
					current: 1,
					state: state
				}
				uni.showLoading()
				this.$api.pageCourierEditExpressOrderApi(param).then(result => {
					uni.hideLoading()
					this.obj = result.resultParam.editExpressOrderPage.records[0]
				}).catch(() => {
					uni.hideLoading()
				})
			}
		}
	}
</script>

<style lang="scss">
	#order-detail {
		padding: 10rpx;

		.u-form-item {
			padding: 0;
			border-bottom: 1rpx solid gray;
		}
	}
</style>
